//
//  HSPSecondCell.m
//  Icar
//
//  Created by dllo on 15/10/16.
//  Copyright © 2015年 小龙侠. All rights reserved.
//

#import "HSPSecondCell.h"
#import "BaseHeader.h"
@implementation HSPSecondCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creat];
    }
    return self;
}
- (void)creat
{
    self.coverImage = [[UIImageView alloc]initWithFrame:CGRectMake(ADJUSTWIDTH * 5, ADJUSTHEIGHT * 5, ADJUSTWIDTH *365 , ADJUSTHEIGHT * 200)];
    [self.contentView addSubview:self.coverImage];
    
    self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(ADJUSTWIDTH * 5, ADJUSTHEIGHT * 170, ADJUSTHEIGHT * 280, ADJUSTHEIGHT * 30 )];
    self.nameLabel.font =[UIFont systemFontOfSize:15. * ADJUSTWIDTH];
    self.nameLabel.textColor = [UIColor whiteColor];
    self.nameLabel.numberOfLines = 0;
    [self.coverImage addSubview:self.nameLabel];
    
    
    self.countLabel = [[UILabel alloc]initWithFrame:CGRectMake(ADJUSTWIDTH * 330, ADJUSTHEIGHT * 170, ADJUSTHEIGHT * 80, ADJUSTHEIGHT * 30 )];
    self.countLabel.font =[UIFont systemFontOfSize:14. * ADJUSTWIDTH];
    self.countLabel.textColor = [UIColor whiteColor];
    self.countLabel.numberOfLines = 0;
    [self.coverImage addSubview:self.countLabel];
    
    
}
- (void)getImage:(HSPImageAppreciate *)model
{
    [self.coverImage sd_setImageWithURL:[NSURL URLWithString:model.cover]placeholderImage:[UIImage imageNamed:@"1.jpg"]];
    self.nameLabel.text = model.name;
   self.countLabel.text = [NSString stringWithFormat:@"%@张",model.photoCount];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
